Skip to content

OPRUN-4056: [OTE] Migrate preflight checks from openshift/origin #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Aug 7, 2025

Migrated OLMv1 operator preflight checks from using external YAML files to defining ClusterRole permissions directly in Go structs. This improves test reliability and simplifies test setup by removing file dependencies.

The changes ensure precise replication of original test scenarios, including specific permission omissions for services, create verbs, ClusterRoleBindings, ConfigMap resourceNames, and escalate/bind verbs.

You can check the PR to delete the migrated tests here : openshift/origin#30074 ( it might help you validate )

Tests:

https://pr-payload-tests.ci.openshift.org/runs/ci/cab853e0-7a77-11f0-80dc-0a55ab730901-0

Screenshot 2025-08-18 at 06 53 34

@openshift-ci openshift-ci bot requested review from anik120 and oceanc80 August 7, 2025 17:56
@camilamacedo86 camilamacedo86 changed the title [OTE] Migrate preflight checks from openshift/origin OPRUN-4056: [OTE] Migrate preflight checks from openshift/origin Aug 7, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 7, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 7, 2025

@camilamacedo86: This pull request references OPRUN-4056 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

Migrated OLMv1 operator preflight checks from using external YAML files to defining ClusterRole permissions directly in Go structs. This improves test reliability and simplifies test setup by removing file dependencies.

The changes ensure precise replication of original test scenarios, including specific permission omissions for services, create verbs, ClusterRoleBindings, ConfigMap resourceNames, and escalate/bind verbs.

Assisted-by: Gemini

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@@ -1,4 +1,64 @@
[
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLMPreflightPermissionChecks][Skipped:Disconnected] OLMv1 operator preflight checks should report error when {services} are not specified",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLMPreflightPermissionChecks][Skipped:Disconnected] OLMv1 operator preflight checks should report error when {create} verb is not specified",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLMPreflightPermissionChecks][Skipped:Disconnected] OLMv1 operator preflight checks should report error when {ClusterRoleBindings} are not specified",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLMPreflightPermissionChecks][Skipped:Disconnected] OLMv1 operator preflight checks should report error when {ConfigMap:resourceNames} are not all specified",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLMPreflightPermissionChecks][Skipped:Disconnected] OLMv1 operator preflight checks should report error when {clusterextension/finalizer} is not specified",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"environmentSelector": {}
},
{
"name": "[sig-olmv1][OCPFeatureGate:NewOLMPreflightPermissionChecks][Skipped:Disconnected] OLMv1 operator preflight checks should report error when {escalate, bind} is not specified",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 7, 2025

@camilamacedo86: This pull request references OPRUN-4056 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

Migrated OLMv1 operator preflight checks from using external YAML files to defining ClusterRole permissions directly in Go structs. This improves test reliability and simplifies test setup by removing file dependencies.

The changes ensure precise replication of original test scenarios, including specific permission omissions for services, create verbs, ClusterRoleBindings, ConfigMap resourceNames, and escalate/bind verbs.

You can check the PR to delete the migrated tests here : openshift/origin#30074 ( it might help you validate )

Assisted-by: Gemini

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@camilamacedo86
Copy link
Contributor Author

/retest-required

@camilamacedo86
Copy link
Contributor Author

/test openshift-e2e-aws

@tmshort
Copy link
Contributor

tmshort commented Aug 8, 2025

/test openshift-e2e-aws-techpreview
Why are the tech preview tests failing?

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 8, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 8, 2025
@camilamacedo86
Copy link
Contributor Author

/hold

We should wait for the new branch cut before proceeding.
But it can be reviewed, please !!!

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 8, 2025
@kuiwang02
Copy link

/lgtm

please note: the merge is held because of cutting branch. so, better to wait for that.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2025
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2025
@camilamacedo86
Copy link
Contributor Author

/test openshift-e2e-aws

@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 18, 2025

@camilamacedo86: This pull request references OPRUN-4056 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set.

In response to this:

Migrated OLMv1 operator preflight checks from using external YAML files to defining ClusterRole permissions directly in Go structs. This improves test reliability and simplifies test setup by removing file dependencies.

The changes ensure precise replication of original test scenarios, including specific permission omissions for services, create verbs, ClusterRoleBindings, ConfigMap resourceNames, and escalate/bind verbs.

You can check the PR to delete the migrated tests here : openshift/origin#30074 ( it might help you validate )

Tests:

https://pr-payload-tests.ci.openshift.org/runs/ci/cab853e0-7a77-11f0-80dc-0a55ab730901-0

Screenshot 2025-08-18 at 06 53 34

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@kuiwang02
Copy link

/lgtm

please note: the merge is held because of cutting branch. so, better to wait for that.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 18, 2025
@@ -19,6 +19,7 @@ LDFLAGS := -X '$(GO_PKG_NAME)/pkg/version.CommitFromGit=$(GIT_COMMIT)' \

METADATA := $(shell pwd)/.openshift-tests-extension/openshift_payload_olmv1.json


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the changes in this file?

Copy link
Contributor Author

@camilamacedo86 camilamacedo86 Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No we do not need :-(
We need rebase with main
But we will miss the tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed !!! 👍

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 20, 2025
Migrated OLMv1 operator preflight checks from using external YAML files to
defining ClusterRole permissions directly in Go structs. This improves test
reliability and simplifies test setup by removing file dependencies.

The changes ensure precise replication of original test scenarios,
including specific permission omissions for services, create verbs,
ClusterRoleBindings, ConfigMap resourceNames, and escalate/bind verbs.

Assisted-by: Gemini
@camilamacedo86
Copy link
Contributor Author

camilamacedo86 commented Aug 20, 2025

Hi @perdasilva

I rebased with main and addressed your comment ( remove unnecessary space in the file which end up due rebases)
But we lose the lgtm.
Could you re-add both for we get it merged?

@perdasilva
Copy link
Contributor

/approve

@perdasilva
Copy link
Contributor

/lgtm

Copy link
Contributor

openshift-ci bot commented Aug 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, perdasilva

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 20, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 20, 2025
@camilamacedo86
Copy link
Contributor Author

/payload-aggregate /payload-aggregate periodic-ci-openshift-release-master-ci-4.20-e2e-gcp-ovn-techpreview 5

Copy link
Contributor

openshift-ci bot commented Aug 20, 2025

@camilamacedo86: it appears that you have attempted to use some version of the payload command, but your comment was incorrectly formatted and cannot be acted upon. See the docs for usage info.

@camilamacedo86
Copy link
Contributor Author

/payload-aggregate periodic-ci-openshift-release-master-ci-4.20-e2e-gcp-ovn-techpreview 5

Copy link
Contributor

openshift-ci bot commented Aug 20, 2025

@camilamacedo86: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-ci-4.20-e2e-gcp-ovn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/2adbf990-7db4-11f0-8f39-b7de71564e96-0

@camilamacedo86
Copy link
Contributor Author

/hold

Until we get the result of the latest

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/2adbf990-7db4-11f0-8f39-b7de71564e96-0

Just to be very extra safe

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 20, 2025
@camilamacedo86
Copy link
Contributor Author

/hold cancel

All finished with success as well , see: https://github.com/openshift/operator-framework-operator-controller/pulls#issuecomment-3205609482

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 20, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 79325a1 and 2 for PR HEAD 863cfdf in total

@camilamacedo86
Copy link
Contributor Author

/test openshift-e2e-aws

Copy link
Contributor

openshift-ci bot commented Aug 20, 2025

@camilamacedo86: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/openshift-e2e-aws-techpreview 863cfdf link false /test openshift-e2e-aws-techpreview

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit f9bf348 into openshift:main Aug 20, 2025
12 of 13 checks passed
@camilamacedo86 camilamacedo86 deleted the migrate-preflight branch August 20, 2025 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants